

{$CLEO .cs}


//0ACA: show_text_box "P1 ready"
//0390: load_txd_dictionary 'battle'
//038F: load_texture "test" as 0 // Load dictionary with 0390 first
model.Load(#BAT)
model.Load(#TEC9)
model.Load(#CAMERA)
model.Load(#GRENADE)
model.Load(#SAWNOFF)
model.Load(#COLT45)
model.Load(#M4)
model.Load(#MINIGUN)
model.Load(#MP5LNG)
model.Load(#DESERT_EAGLE)
model.Load(#CHROMEGUN)
model.Load(#KNIFECUR)
model.Load(#SNIPER)
model.Load(#GUN_CANE)
model.Load(#KATANA)

038B: load_requested_models
//0209: 18@ = random_int_in_ranges 0 7
marker.CreateAboveActor(30@, $PLAYER_ACTOR)

marker.SetColor(30@, 0)
07BF: set_marker 30@ tracking_blip 1

018B: set_marker 30@ radar_mode 2
07BF: set_marker 30@ tracking_blip 1

const
MUSIC_PLAYS = 25@
KILLED =  26@

end

18@ = 2
//MUSIC_PLAYS = //audiostream.Load("cleo\battle_maps\bunker2.mp3")
////audiostream.PerformAction(MUSIC_PLAYS, play)
////audiostream.Loop(MUSIC_PLAYS,1)
//KILLED = //audiostream.Load("cleo\battle_maps\death2.mp3")
if 
056D:   actor $PLAYER_ACTOR defined

then   
04C4: store_coords_to 19@ 20@ 21@  from_actor $PLAYER_ACTOR with_offset -40.0 40.0 -6661.0 
04C4: store_coords_to 22@ 23@ 24@ from_actor $PLAYER_ACTOR with_offset 40.0 -40.0 -6661.0 
02C1: store_to 19@ 20@ 21@  ped_path_coords_closest_to 22@ 23@ 24@   
gosub @respawn
end


:1


04C4: store_coords_to 19@ 20@ 21@  from_actor $PLAYER_ACTOR with_offset 40.0 -40.0 -5000.0 
04C4: store_coords_to 22@ 23@ 24@ from_actor $PLAYER_ACTOR with_offset -40.0 40.0 -5000.0 
02C1: store_to 19@ 20@ 21@   ped_path_coords_closest_to 22@ 23@ 24@

0209: 18@ = random_int_in_ranges 0 7
wait 0
gosub @player_dead 
//gosub @score 
if
$onmission  == 0
jf @2
:jump

//0391: release_textures
marker.Disable(30@)
0169: set_fade_color_RGB 0 0 0
//audiostream.Release(MUSIC_PLAYS)
//audiostream.Release(KILLED)
0A93: end_custom_thread

end_thread

:2 
if
$actor_sweet == 0
jf @1
0A92: create_custom_thread "battle_maps\respawnP1_anywhere.cs"
jump @jump 


:player_dead
//04D3: get_nearest_car_path_coords_from $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD type 2 store_to 88@ 89@ 90@


04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 
if
actor.Dead($playeR_actor)
then
//0169: set_fade_color_RGB 255 0 0

//audiostream.PerformAction(MUSIC_PLAYS, PAUSE)
//audiostream.PerformAction(killed, play)
0169: set_fade_color_RGB 0 0 0
06AB: set_actor $PLAYER_ACTOR all_weapons_hidden 1

0223: set_actor $PLAYER_ACTOR health_to 9999999 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@ 
0ACB: show_styled_text "~r~Player 1 is killed!" time 3000 style 7 
04D7: set_actor $PLAYER_ACTOR locked 1 
player.CanMove($player_char) = false
$actor_RYDER -= 1 //score to player 2       $actor_smoke
0581: enable_radar 0
0826: enable_hud 0

gosub @Dead_animes 
gosub @headshot 
0001: wait 200 ms 
//02FD: show_text_2numbers_lowpriority GXT 'score' numbers $411 $412 time 3000 flag 1  // Info
//03F0: enable_text_draw 1 
//03E0: draw_text_behind_textures 1
///038E: draw_box_position 320.0 224.0 size 9999.0 9999.0 RGBA 0 0 0 180

//
//03E3: set_texture_to_be_drawn_antialiased 1
//038D: draw_texture 0 position 325.0 225.0 size 900.0 900.0 RGBA 100 0 0 180 
016A: fade 0 time 3000 
0001: wait 4000 ms 
0169: set_fade_color_RGB 0 0 0
016A: fade 1 time 3000 
0581: enable_radar 1
0826: enable_hud 1
//audiostream.PerformAction(killed, stop)
//audiostream.PerformAction(MUSIC_PLAYS, RESUME)
gosub @respawn 

end
return





:Dead_animes 

if
056D:   actor $PLAYER_ACTOR defined

then
if
8965: not  actor $PLAYER_ACTOR swimming

else_jump  @water_death 
:animes 
0209: 17@ = random_int_in_ranges 0 7
if
17@ == 0
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_shot_stom" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 1
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_shot_front" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 2
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_skid_front" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 3
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_spin_L" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 4
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_spin_r" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 5
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_skid_back" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 6
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KD_left" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 6
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KD_right" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
if
17@ == 7
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KD_right" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

end
end
return

:headshot 
if
09A8:   actor $PLAYER_ACTOR headshoted
then
0812: AS_actor $PLAYER_ACTOR perform_animation "KO_shot_face" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

//wait 5
//0ACB: show_styled_text "~b~Headshot!" time 3000 style 7 
//$actor_smoke += 1

end
return

:water_death 
0812: AS_actor $PLAYER_ACTOR perform_animation "Drown" IFP "ped" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 1 time 4000 // versionB 

return




:respawn

if
056D:   actor $PLAYER_ACTOR defined
then
:spawn
if
18@ == 0
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   19@ 20@ 21@ 
actor.Angle($PLAYER_ACTOR) =  180.1843
return
end
if
18@ == 1
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   19@ 20@ 21@ 
actor.Angle($PLAYER_ACTOR) =   9.2722
return
end
if
18@ == 2
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   22@ 23@ 24@
actor.Angle($PLAYER_ACTOR) =   358.2107
return
end
if
18@ == 3
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at    22@ 23@ 24@
actor.Angle($PLAYER_ACTOR) =  274.2106
return
end

if
18@ == 4
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   19@ 20@ 21@ 
actor.Angle($PLAYER_ACTOR) = 107.2918
return
end

if
18@ == 5
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   19@ 20@ 21@ 
actor.Angle($PLAYER_ACTOR) =   83.5331
return
end


if
18@ == 6
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at  19@ 20@ 21@ 
actor.Angle($PLAYER_ACTOR) =   88.7716

return
end


if
18@ == 7
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at  22@ 23@ 24@
actor.Angle($PLAYER_ACTOR) =   359.3138
return
end
if
18@ == 8
then
gosub @loadouts 
00A1: put_actor $PLAYER_ACTOR at   22@ 23@ 24@
actor.Angle($PLAYER_ACTOR) =   15.4638
return
end

:the_end
end
return






:loadouts
player.CanMove($player_char) = true
//0792: disembark_instantly_actor $PLAYER_ACTOR
04D7: set_actor $PLAYER_ACTOR locked 0
0687: clear_actor $PLAYER_ACTOR task
0605: actor $PLAYER_ACTOR perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 0 time 1000
06AB: set_actor $PLAYER_ACTOR all_weapons_hidden 0

actor.Health($PLAYER_ACTOR) = 9999             {
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,deserteagle, 400)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,shotgun, 80)
//actor.GiveWeaponAndAmmo($PLAYER_ACTOR,Cane, 80)
//actor.GiveWeaponAndAmmo($PLAYER_ACTOR,baseballbat, 120)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,mp5, 300)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,sniperrifle, 30)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,minigun, 1000)
actor.GiveWeaponAndAmmo($PLAYER_ACTOR,m4, 500)
                                                 }
//0687: clear_actor $PLAYER_ACTOR task

return



































